<template>
	<view>
		<view class="header">
			<u-navbar title="订单详情" back-icon-size='44' :background="background" title-color="#FFFFFF"
				:border-bottom='false' back-icon-color='#FFFFFF' :custom-back="customBack">
				<view slot='right' style="padding-right: 28rpx">
					<u-icon name="reload" color="#FFFFFF" size="36"></u-icon>
				</view>
			</u-navbar>
			<view class="status">
				<image src="../../../static/imgs/zzcg.png" mode=""></image>
				<view class="type">
					占座成功
				</view>
				<view class="time">
					<text>支付剩余</text>
					<text>27分43秒</text>
				</view>
			</view>
			
			<view class="seatInfo">
				<view class="top">
					<view class="type">
						火车票
					</view>
					<view class="stop">
						<u-icon name="map-fill" color="#8594B1" size="28"></u-icon>
						<text>经停站</text>
					</view>
				</view>
				<view class="date">
					<text>01月29日 周五出发</text>
					<text style="margin-left: 6rpx;">K236</text>
				</view>
				<view class="station">
					<text>14:03 深圳站</text> - <text>03:56 襄阳北站</text>
				</view>
				<view class="trainPeo-ul">
					<view class="trainPeo-li">
						<view class="name">
							小桌子
						</view>
						<view class="right">
							<view class="seat">
								硬座¥132.5
							</view>
							<view class="seatNum">
								02车厢0022号
							</view>
						</view>
					</view>
				</view>
				
			</view>
			
			<view class="cancel">
				取消订单
			</view>
			
		</view>
		
		<view class="payment">
			<view class="left">
				<view class="text">
					订单总额
				</view>
				<view class="price">
					<text style="font-weight: normal;font-size: 28rpx;">¥</text>569
				</view>
				<view class="tool" @click="showMask=true">
					<u-icon name="arrow-up" color="#999999" size="28"></u-icon>
				</view>
			</view>
			<view class="next" @click="navTo('./payment')">
				去支付
			</view>
		</view>
		
		<u-popup v-model="showMask" mode="bottom" closeable border-radius="16">
			<view class="detailBox">
				<view class="title">
					价格明细
				</view>
				<view class="detail-item">
					<view class="left">
						火车票
					</view>
					<view class="right">
						¥569 x1
					</view>
				</view>
		
			</view>
		</u-popup>
		
		<u-modal v-model="showTip" :content="content" title="温馨提示" show-cancel-button confirm-text='继续返回' cancel-text='留在这儿' @confirm="confirmFn"></u-modal>
				
	</view>
</template>

<script>
	export default {
		data() {
			return {
				content:'您有待支付订单，返回后将无法继续下单，建议您支付或取消订单后再返回',
				showTip:false,
				showMask:false,
				checked:false,
				background: {
					backgroundColor: 'rgba(255,255,255,0)'
				}
			}
		},
		methods: {
			confirmFn(){
				uni.navigateBack({
					delta:1
				})
			},
			customBack(){
				this.showTip = true
			},
			navTo(url) {
				uni.navigateTo({
					url: url
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.header {
		width: 100%;
		height: 606rpx;
		background: linear-gradient(180deg, #3DA4FE 0%, #3587F7 74%, rgba(45, 123, 247, 0) 100%);
		.status {
			width: 100%;
			height: 160rpx;
			display: flex;
			align-items: center;
			padding-left: 56rpx;
			padding-right: 28rpx;
			image {
				width: 60rpx;
				height: 60rpx;
			}
			.type {
				font-size: 40rpx;
				font-family: Segoe UI;
				font-weight: 400;
				color: #FFFFFF;
				margin-left: 28rpx;
			}
			.time {
				font-size: 28rpx;
				font-family: Segoe UI;
				font-weight: 400;
				color: #FFFFFF;
				margin-left: auto;
			}
		}
		
		.seatInfo {
			margin: 0 auto;
			width: 694rpx;
			height: auto;
			background: #FFFFFF;
			border-radius: 16rpx;
			padding: 0 24rpx 24rpx;
			.top {
				width: 100%;
				height: 66rpx;
				display: flex;
				align-items: center;
				.type {
					font-size: 36rpx;
					font-family: Segoe UI;
					font-weight: bold;
					color: #333333;
				}
				.stop {
					margin-left: auto;
					font-size: 24rpx;
					font-family: Segoe UI;
					font-weight: 400;
					color: #8594B1;
				}
			}
			
			.date {
				margin-top: 8rpx;
				font-size: 24rpx;
				font-family: Alibaba Sans;
				font-weight: bold;
				color: #333333;
			}
			.station {
				margin-top: 8rpx;
				font-size: 28rpx;
				font-family: Segoe UI;
				font-weight: bold;
				color: #333333;
			}
		
			.trainPeo-ul {
				margin-top: 18rpx;
				.trainPeo-li {
					width: 660rpx;
					height: 80rpx;
					background: #F9FAFE;
					border-radius: 4rpx;
					display: flex;
					align-items: center;
					justify-content: space-between;
					padding: 0 10rpx;
					.name {
						font-size: 28rpx;
						font-family: Segoe UI;
						font-weight: 400;
						color: #333333;
					}
					.right {
						display: flex;
						align-items: center;
						font-size: 28rpx;
						font-weight: 400;
						font-family: Segoe UI;
						color: #333333;
						.seatNum {
							margin-left: 10rpx;
						}
					}
				}
			}
			
		}
	
		.cancel {
			width: 690rpx;
			height: 88rpx;
			background: #FFFFFF;
			border-radius: 16rpx;
			margin: 20rpx auto 0;
			font-size: 28rpx;
			font-family: Segoe UI;
			font-weight: 400;
			line-height: 88rpx;
			color: #333333;
			text-align: center;
		}
	}
	
	.payment {
		width: 100%;
		height: 112rpx;
		background: #FFFFFF;
		position: fixed;
		bottom: 0;
		display: flex;
		align-items: center;
		padding: 0 28rpx;
		z-index: 1000;
		.left {
			display: flex;
			align-items: center;
			.text {
				font-size: 28rpx;
				font-family: Segoe UI;
				font-weight: 400;
				color: #333333;
			}
			.price {
				margin-left: 8rpx;
				font-size: 44rpx;
				font-family: Segoe UI;
				font-weight: bold;
				color: #F57426;
			}
			.tool {
				margin-left: 8rpx;
			}
		}
		.next {
			width: 400rpx;
			height: 80rpx;
			background: linear-gradient(180deg, #FEA837 0%, #FF7700 100%);
			border-radius: 8rpx;
			font-size: 32rpx;
			font-family: Segoe UI;
			font-weight: 400;
			line-height: 80rpx;
			color: #FFFFFF;
			text-align: center;
			margin-left: auto;
		}
	}
	
	.detailBox {
		padding: 0 28rpx;
		.title {
			width: 100%;
			height: 88rpx;
			font-size: 32rpx;
			font-family: Segoe UI;
			font-weight: bold;
			color: #333333;
			line-height: 88rpx;
		}
		.detail-item {
			width: 100%;
			height: 88rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			.left {
				font-size: 28rpx;
				font-family: Segoe UI;
				font-weight: 400;
				color: #333333;
			}
			.right {
				font-size: 28rpx;
				font-family: Segoe UI;
				font-weight: 400;
				color: #F57426;
			}
		}
	}
	
</style>
